<?php
namespace Admin\Controller;
/**
 * 财务有管理    --  退货订单
 * User: linkwhy
 * Date: 2015/11/5
 * Time: 12:23
 */
class ReturnOrderController extends AdminController{
    public function index(){
        $time_start = I('get.time-start');
        $time_end = I('get.time-end');

        $where['return_status'] = 8;

        if ( isset($time_start) ) {
            $where['return_stime'][] = array('egt',strtotime($time_start));
        }
        if ( isset($time_end) ) {
            $where['return_stime'][] = array('elt',24*60*60 + strtotime($time_end));
        }

        $list   = $this->lists('return_goods', $where);
        int_to_string($list_order);
        foreach($list as &$val){
            $val['bank'] = floatval($val['return_money']) * C('BRANKFEE');  //银行手续费
            $val['zkj'] = floatval($val['return_money']) * C('RETURNZK');   //定制价
            $val['allMoney'] = floatval($val['return_money']) - $val['bank'] - $val['zkj'];
        }

        $this->assign('_list', $list);
        $this->display();
    }
}